package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeMaincheckhealthadviceMapper;
import com.dime.physical.domain.DimeMaincheckhealthadvice;
import com.dime.physical.service.IDimeMaincheckhealthadviceService;

/**
 * 主检健康建议Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-17
 */
@Service
public class DimeMaincheckhealthadviceServiceImpl implements IDimeMaincheckhealthadviceService 
{
    @Autowired
    private DimeMaincheckhealthadviceMapper dimeMaincheckhealthadviceMapper;

    /**
     * 查询主检健康建议
     * 
     * @param id 主检健康建议主键
     * @return 主检健康建议
     */
    @Override
    public DimeMaincheckhealthadvice selectDimeMaincheckhealthadviceById(String id)
    {
        return dimeMaincheckhealthadviceMapper.selectDimeMaincheckhealthadviceById(id);
    }

    /**
     * 查询主检健康建议列表
     * 
     * @param dimeMaincheckhealthadvice 主检健康建议
     * @return 主检健康建议
     */
    @Override
    public List<DimeMaincheckhealthadvice> selectDimeMaincheckhealthadviceList(DimeMaincheckhealthadvice dimeMaincheckhealthadvice)
    {
        return dimeMaincheckhealthadviceMapper.selectDimeMaincheckhealthadviceList(dimeMaincheckhealthadvice);
    }

    /**
     * 新增主检健康建议
     * 
     * @param dimeMaincheckhealthadvice 主检健康建议
     * @return 结果
     */
    @Override
    public int insertDimeMaincheckhealthadvice(DimeMaincheckhealthadvice dimeMaincheckhealthadvice)
    {
        dimeMaincheckhealthadvice.setCreateTime(DateUtils.getNowDate());
        return dimeMaincheckhealthadviceMapper.insertDimeMaincheckhealthadvice(dimeMaincheckhealthadvice);
    }

    /**
     * 修改主检健康建议
     * 
     * @param dimeMaincheckhealthadvice 主检健康建议
     * @return 结果
     */
    @Override
    public int updateDimeMaincheckhealthadvice(DimeMaincheckhealthadvice dimeMaincheckhealthadvice)
    {
        dimeMaincheckhealthadvice.setUpdateTime(DateUtils.getNowDate());
        return dimeMaincheckhealthadviceMapper.updateDimeMaincheckhealthadvice(dimeMaincheckhealthadvice);
    }

    /**
     * 批量删除主检健康建议
     * 
     * @param ids 需要删除的主检健康建议主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckhealthadviceByIds(String[] ids)
    {
        return dimeMaincheckhealthadviceMapper.deleteDimeMaincheckhealthadviceByIds(ids);
    }

    /**
     * 删除主检健康建议信息
     * 
     * @param id 主检健康建议主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckhealthadviceById(String id)
    {
        return dimeMaincheckhealthadviceMapper.deleteDimeMaincheckhealthadviceById(id);
    }
}
